package com.site.wisdom_construction.controller.statisticsModule;

import com.site.wisdom_construction.responseEntity.OneDataResult;
import com.site.wisdom_construction.service.iotModule.MonitoringService;
import com.site.wisdom_construction.service.personnelModule.ContractWorkersStatisticsService;
import com.site.wisdom_construction.service.personnelModule.ManagerialStaffStatisticsService;
import com.site.wisdom_construction.service.statisticsModule.StatisticsPersonService;
import com.site.wisdom_construction.statisticsResult.CountPersonByHt;
import com.site.wisdom_construction.util.verification.NoToken;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Author daiyifei
 * @Date 2022/1/24
 * @Description
 */
@Api(tags = "物联设备统计数据接口")
@RestController
@RequestMapping("StatisticsIot")
@CrossOrigin
public class StatisticsIotController {
    @Autowired
    private MonitoringService monitoringService;

    @ApiOperation(value = "统计监控总数", notes = "测试数据:")
    @PostMapping("/countMonitoring")
    @NoToken
    public OneDataResult countMonitoring(@RequestBody Map map) {
        OneDataResult oneDataResult = new OneDataResult();
        oneDataResult.setData(monitoringService.countMonitoring(map));
        return oneDataResult;
    }


}
